package util;


import com.supermap.desktop.core.utilties.FileUtilities;

/**
 * Created by hanyz on 2017/1/6.
 */
public class FileUtil {
    /**
     * 删除一个文件或目录，调用桌面方法
     * @param filePath
     * @return
     */
    public static boolean delete(String filePath){
        return FileUtilities.delete(filePath);
    }

    /**
     * 删除一些文件或目录
     * @param files
     * @return
     */
    public static void delete(String[] files){
        boolean isDeleted = false;
        for(int i=0;i<files.length;i++){
            isDeleted = FileUtilities.delete(files[i]);
            if(!isDeleted){
                Info.out(files[i] + "删除失败");
            }
        }
    }


}
